//
//  HWTweetContentV.m
//  HomeWork
//
//  Created by apple on 2017/10/25.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HWTweetContentV.h"

@interface HWTweetContentV()
/** 文本 */
@property (strong, nonatomic) UILabel *contentL;
@end

@implementation HWTweetContentV

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupSubviews];
    }
    return self;
}

- (void)setupSubviews{
    
    UILabel *contentL = [[UILabel alloc] init];
    contentL.chainFont(FONT(14)).chainLines(0);
    [self addSubview:contentL];
    self.contentL = contentL;
    
}

- (void)layoutUI{
    
    self.contentL.preferredMaxLayoutWidth = (kScreenWidth - homeScale(73));
    [self.contentL setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
    [self.contentL mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self);
    }];
}

- (void)setContent:(NSString *)content{
    _content = content;
    self.contentL.text = content;
    [self layoutUI];
}

@end
